package demo2;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ASUS
 * Date: 2023-09-25
 * Time: 16:51
 */
public class Work2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入想要显示乘法表的值n:");
        int n = scanner.nextInt();
        int x = 0;
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= i; j++) {
                x = i * j;
                System.out.print(j +"*" + i + "="+x+" ");

            }
            System.out.println();
        }
    }
}
